////////////////////////////////////////////////////////////////////////////////
/// @file    led.h
/// @author  AE TEAM
/// @brief   THIS FILE PROVIDES ALL THE SYSTEM FIRMWARE FUNCTIONS.
////////////////////////////////////////////////////////////////////////////////
/// @attention
///
/// THE EXISTING FIRMWARE IS ONLY FOR REFERENCE, WHICH IS DESIGNED TO PROVIDE
/// CUSTOMERS WITH CODING INFORMATION ABOUT THEIR PRODUCTS SO THEY CAN SAVE
/// TIME. THEREFORE, MINDMOTION SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT OR
/// CONSEQUENTIAL DAMAGES ABOUT ANY CLAIMS ARISING OUT OF THE CONTENT OF SUCH
/// HARDWARE AND/OR THE USE OF THE CODING INFORMATION CONTAINED HEREIN IN
/// CONNECTION WITH PRODUCTS MADE BY CUSTOMERS.
///
/// <H2><CENTER>&COPY; COPYRIGHT MINDMOTION </CENTER></H2>
////////////////////////////////////////////////////////////////////////////////

// Define to prevent recursive inclusion
#ifndef __SLCD_H
#define __SLCD_H

// Files includes
#include <string.h>

#include "mm32l0136c.h"
#include "hal_slcd.h"

////////////////////////////////////////////////////////////////////////////////
/// @defgroup MM32_Example_Layer
/// @brief MM32 Example Layer
/// @{

////////////////////////////////////////////////////////////////////////////////
/// @defgroup MM32_RESOURCE
/// @brief MM32 Examples resource modules
/// @{
typedef struct {
    char    ch;
    uint8_t Data;
} LCD_CODING_TypeDef;
////////////////////////////////////////////////////////////////////////////////
/// @defgroup MM32_Exported_Constants
/// @{

/// @}

////////////////////////////////////////////////////////////////////////////////
/// @defgroup MM32_Exported_Enumeration
/// @{

////////////////////////////////////////////////////////////////////////////////
/// @brief XXXX enumerate definition.
/// @anchor XXXX
////////////////////////////////////////////////////////////////////////////////

/// @}

////////////////////////////////////////////////////////////////////////////////
/// @defgroup MM32_Exported_Variables
/// @{
#ifdef _SLCD_C_
#define GLOBAL

#else
#define GLOBAL extern

#endif

#undef GLOBAL

/// @}

/// @defgroup SLCD IO OFFSET
/// @{
#define MAX_SLCD_PIN_NUMBER             64
#define SLCD_L0                         (0x01UL <<  0)
#define SLCD_L1                         (0x01UL <<  1)
#define SLCD_L2                         (0x01UL <<  2)
#define SLCD_L3                         (0x01UL <<  3)
#define SLCD_L4                         (0x01UL <<  4)
#define SLCD_L5                         (0x01UL <<  5)
#define SLCD_L6                         (0x01UL <<  6)
#define SLCD_L7                         (0x01UL <<  7)
#define SLCD_L8                         (0x01UL <<  8)
#define SLCD_L9                         (0x01UL <<  9)
#define SLCD_L10                        (0x01UL << 10)
#define SLCD_L11                        (0x01UL << 11)
#define SLCD_L12                        (0x01UL << 12)
#define SLCD_L13                        (0x01UL << 13)
#define SLCD_L14                        (0x01UL << 14)
#define SLCD_L15                        (0x01UL << 15)
#define SLCD_L16                        (0x01UL << 16)
#define SLCD_L17                        (0x01UL << 17)
#define SLCD_L18                        (0x01UL << 18)
#define SLCD_L19                        (0x01UL << 19)
#define SLCD_L20                        (0x01UL << 20)
#define SLCD_L21                        (0x01UL << 21)
#define SLCD_L22                        (0x01UL << 22)
#define SLCD_L23                        (0x01UL << 23)
#define SLCD_L24                        (0x01UL << 24)
#define SLCD_L25                        (0x01UL << 25)
#define SLCD_L26                        (0x01UL << 26)
#define SLCD_L27                        (0x01UL << 27)
#define SLCD_L28                        (0x01UL << 28)
#define SLCD_L29                        (0x01UL << 29)
#define SLCD_L30                        (0x01UL << 30)
#define SLCD_L31                        (0x01UL << 31)
#define SLCD_L32                        (0x01UL << 0 )
#define SLCD_L33                        (0x01UL << 1 )
#define SLCD_L34                        (0x01UL << 2 )
#define SLCD_L35                        (0x01UL << 3 )
#define SLCD_L36                        (0x01UL << 4 )
#define SLCD_L37                        (0x01UL << 5 )
#define SLCD_L38                        (0x01UL << 6 )
#define SLCD_L39                        (0x01UL << 7 )
#define SLCD_L40                        (0x01UL << 8 )
#define SLCD_L41                        (0x01UL << 9 )
#define SLCD_L42                        (0x01UL << 10)
#define SLCD_L43                        (0x01UL << 11)
#define SLCD_L44                        (0x01UL << 12)
#define SLCD_L45                        (0x01UL << 13)
#define SLCD_L46                        (0x01UL << 14)
#define SLCD_L47                        (0x01UL << 15)
#define SLCD_L48                        (0x01UL << 16)
#define SLCD_L49                        (0x01UL << 17)
#define SLCD_L50                        (0x01UL << 18)
#define SLCD_L51                        (0x01UL << 19)
#define SLCD_L52                        (0x01UL << 20)
#define SLCD_L53                        (0x01UL << 21)
#define SLCD_L54                        (0x01UL << 22)
#define SLCD_L55                        (0x01UL << 23)
#define SLCD_L56                        (0x01UL << 24)
#define SLCD_L57                        (0x01UL << 25)
#define SLCD_L58                        (0x01UL << 26)
#define SLCD_L59                        (0x01UL << 27)
#define SLCD_L60                        (0x01UL << 28)
#define SLCD_L61                        (0x01UL << 29)
#define SLCD_L62                        (0x01UL << 30)
#define SLCD_L63                        (0x01UL << 31)
/// @}

////////////////////////////////////////////////////////////////////////////////
/// @defgroup MM32_Exported_Functions
/// @{

// void slcd_test(void);
// void slcd_init(void);
void LCD_DisplayNumber1(uint8_t Index, char ch, uint8_t Point);
void LCD_DisplayNumber2(uint8_t Index, char ch, uint8_t Point);
void LCD_DisplayUnit(uint8_t Index, uint8_t State);
void LCD_Clear(void);
void LCD_DisplayDataUpdate(void);
void LCD_DisplayNumbers1(uint32_t Number);
void LCD_DisplayNumbers2(uint32_t Number);
void LCD_DisplayFLoat1(double fNumber, uint8_t Point);
void LCD_DisplayFLoat2(double fNumber, uint8_t Point);
/// @}

/// @}

/// @}

////////////////////////////////////////////////////////////////////////////////
#endif
////////////////////////////////////////////////////////////////////////////////
